home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.2 KB | 42 lines | [TEXT/GEOL] |
- Item 9372308 18-Jan-91 12:41PST
-
- From: MERRITT Merritt, Jim
-
- To: BROSNAHAN.R Richard Brosnahan,GEIS
-
- cc: MACAPP.TECH$ MacApp Technical
-
- ------------------------------------------------------------------------------
-
- Sub: Re: Re: Modula-2 reference
-
- The p1 Modula-2 compiler mentioned earlier has worked well for me under MPW (I
- use it to make MPW tools, mostly). There are other MPW and/or Mac
- implementations, I believe, but I am not familiar with any other,
- currently-supported MPW-based M2 compiler. I acquired p1 M2 through the
- MacApp Developers' Association.
-
- By the way, I'd like to correct myself on something I implied earlier about
- Modula-2's descendant, Oberon. Actually, Oberon doesn't support "inheritance"
- in the classic OOP sense. It does support data-type extension, in that you can
- define a record data-type B by specifying it as "the same as A with some
- additional fields." I like to think of that as being part of inheritance, but
- "true" inheritance -- the passing on of methods as well as structures in the
- DEFINITION of a type/class -- is not provided by Oberon. Instead, Oberon
- adopts Modula-2's notion of a procedure variable, and lets you define any
- record to include procedure variables as fields. When you initialize an
- instance of such a record at runtime, you must explicitly bind each procedure
- variable with a procedure (i.e., a method). This causes a little busy work for
- OOP programmers used to automatic inheritance, but it also eliminates the need
- to have facilities for "overriding" inheritance, among other benefits. Sadly,
- Modula-2 does not have Oberon's elegant type-extension facility (though it does
- have rich data structuring facilities by the standards of those used to
- Pascal-type languages), and Oberon does not have enumerated types or type
- subranges, which I have found so useful in both Pascal and Modula-2. Each
- language offers a slightly different, though overlapping grab bag of tools, to
- my great frustration, as both are very attractive to me, and I would like to
- settle on one or the other to simplify my programming life! ;)
-
- -Jim Merritt, Apple Computer, Inc.
-
-